add gdk_gc_quartz_init() and set some values to the defaults used by X11.
authorMichael Natterer <mitch@imendio.com>
Thu, 7 Jun 2007 21:22:15 +0000 (21:22 +0000)
committerMichael Natterer <mitch@src.gnome.org>
Thu, 7 Jun 2007 21:22:15 +0000 (21:22 +0000)
2007-06-07  Michael Natterer  <mitch@imendio.com>

* gdk/quartz/gdkgc-quartz.c: add gdk_gc_quartz_init() and set
some values to the defaults used by X11.

(gdk_quartz_gc_set_values): really set cap_style when
GDK_GC_CAP_STYLE is in the mask, not line_style.

svn path=/trunk/; revision=18079

ChangeLog
gdk/quartz/gdkgc-quartz.c

index c3de6f3a6baa2e8be609073a8f78cb290a966a58..1e2f5ef94946b65b9a3dab01a6a18e87d0988d6f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-06-07  Michael Natterer  <mitch@imendio.com>
+
+       * gdk/quartz/gdkgc-quartz.c: add gdk_gc_quartz_init() and set
+       some values to the defaults used by X11.
+
+       (gdk_quartz_gc_set_values): really set cap_style when
+       GDK_GC_CAP_STYLE is in the mask, not line_style.
+
 2007-06-07  Michael Natterer  <mitch@imendio.com>
 
        * gdk/quartz/gdkgc-quartz.c (_gdk_quartz_gc_update_cg_context):
index 26273e1a36fde555c3afffa3b8bf04880be061e7..159d707dbfa766678097a4dc0a5bc50c20ea0cc1 100644 (file)
@@ -101,7 +101,7 @@ gdk_quartz_gc_set_values (GdkGC           *gc,
     private->line_style = values->line_style;
 
   if (mask & GDK_GC_CAP_STYLE)
-    private->line_style = values->line_style;
+    private->cap_style = values->cap_style;
 
   if (mask & GDK_GC_JOIN_STYLE)
     private->join_style = values->join_style;
@@ -150,6 +150,18 @@ gdk_gc_quartz_class_init (GdkGCQuartzClass *klass)
   gc_class->set_dashes = gdk_quartz_gc_set_dashes;
 }
 
+static void
+gdk_gc_quartz_init (GdkGCQuartz *gc_quartz)
+{
+  gc_quartz->function = GDK_COPY;
+  gc_quartz->subwindow_mode = GDK_CLIP_BY_CHILDREN;
+  gc_quartz->graphics_exposures = TRUE;
+  gc_quartz->line_width = 0;
+  gc_quartz->line_style = GDK_LINE_SOLID;
+  gc_quartz->cap_style = GDK_CAP_BUTT;
+  gc_quartz->join_style = GDK_JOIN_MITER;
+}
+
 GType
 _gdk_gc_quartz_get_type (void)
 {
@@ -167,7 +179,7 @@ _gdk_gc_quartz_get_type (void)
         NULL,           /* class_data */
         sizeof (GdkGCQuartz),
         0,              /* n_preallocs */
-        (GInstanceInitFunc) NULL,
+        (GInstanceInitFunc) gdk_gc_quartz_init,
       };
       
       object_type = g_type_register_static (GDK_TYPE_GC,